/*邮件管理*/
layui.define(['layer','form'], function(exports) {
    var $ = layui.jquery;
    var layer=layui.layer;
    var form = layui.form();

    $('#btn_save').click(function(){
        if($("#name").val()==""){layer.msg("请填写日志类型名称");return false;}
        if($("#odx").val()==""){layer.msg("请填写日志类型排序");return false;}
        var ex = /^\d+$/;
        if(!ex.test($("#odx").val())){layer.msg("请填写从0开始的整数");return false;}
        $.post('html/worklogs/srv/edit_worklogs_type.php',$('#form1').serialize(),function(e){
            layer.msg(e);      
            setTimeout("parent.layer.close(parent.layer.getFrameIndex(window.name))", 2000);
        })
    });  
    exports('worklogs_edit_type', {});
    
});